package com.quanyan.activity.service;

import com.quanyan.activity.entity.ActivityInfo;
import com.quanyan.common.Plugin.PageObj;

import java.util.List;
import java.util.Map;

/**
 * ActivityServiceExpose
 * @author Li Shuai
 * @date 16/6/2
 */
public interface ActivityOpenService {
    /**
     * 创建活动
     */
    ActivityInfo saveActivity(ActivityInfo reqActivity);
    /**
     * 编辑活动
     */
    ActivityInfo updateActivity(ActivityInfo reqActivity);

    ActivityInfo updateTbActivity(ActivityInfo reqActivity);

    /**
     * 取消活动
     */
    int cancelActivityById(Integer activityId);
    /**
     * 活动详情
     */
    ActivityInfo queryOneActivityById(Integer activityId);

    /**
     * 活动简要
     * @param activityId
     * @return
     */
    ActivityInfo selectOneActivityById(Integer activityId);

    /**
     * 查询活动列表
     * @param
     * @return
     */
    List<ActivityInfo> queryActivityList(List<Integer> activityIdList);

    /**
     * 查询活动列表
     * @param
     * @return
     */
    Map<Integer, ActivityInfo> queryActivityMapList(List<Integer> activityIdList);

    /**
     * 检索指定的活动ID并返回符合条件的活动列表
     * @param activityIdList
     * @param condition
     * @return
     */
    List<ActivityInfo> queryActivityListByCondition(List<Integer> activityIdList, Map<String, Object> condition);

    /**
     * 创建周期活动
     * @param activityIdList
     * @param condition
     * @return
     */
    Map<Integer, Integer> createWeekActivity(List<Integer> activityIdList, Map<String, Object> condition);

    /**
     * 计算正在报名的活动个数
     * @param activityIdList
     * @param condition
     * @return
     */
    int countActivityListByCondition(List<Integer> activityIdList, Map<String, Object> condition);

    /**
     * 查询已经删除的活动列表
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageObj<List<ActivityInfo>> queryDeleteActivity(Integer pageNum, Integer pageSize);

    /**
     * 检索指定的活动ID并返回符合条件的ID列表
     * @param activityIdList
     * @param condition
     * @return
     */
    List<Integer> queryActivityIdsByCondition(List<Integer> activityIdList, Map<String, Object> condition);

    List<List<Integer>> queryEveryDayActivityByCondition(List<List<Integer>> activityIdList, Map<String, Object> condition);

    ActivityInfo selectSignActivityByUid(List<Integer> activityIdList, Map<String, Object> condition);
    /**
     * 收藏 取消活动
     * @return
     */
    boolean collectActivity(Integer uid,Integer activityId,Integer type);

    PageObj<List<ActivityInfo>> myActivityList(Integer uid,Integer pageSize, Integer pageIndex);

    PageObj<List<ActivityInfo>> queryOneActivityByPlaceId(Integer placeId, Integer pageNum,Integer pageSize);

    PageObj<List<ActivityInfo>> queryOneActivityByPlaceId(Integer placeId, Integer category, Integer pageNum,Integer pageSize);

    Map<Long, Long> queryIsFull(List<Integer> activityIds);

    List<Integer> queryActivityIdsByName(String activityName);
}
